import time
dt = "2016-05-05 20:28:54"
tm = time.strptime(dt, "%Y-%m-%d %H:%M:%S")
print(tm)

ts = time.mktime(tm)
print(ts)